Technical Field
The present invention relates to a technology of extracting a desired area from an image.
Related Art
There is a well-known technology called area partition (segmentation) on which a given image is separated into a foreground (portion to be extracted) and a background (other portions) through digital image processing using a computer. Conventionally, various area partitioning algorithms are proposed. The area partitioning algorithm is roughly divided into a pixel-based method for determining a foreground or a background in each pixel and a contour-based method for searching a boundary between the foreground and the background. Examples of the former include simple binarization or color gamut extraction and color division by clustering. PTL 1 proposes a method for finely distinguishing between the pixel of a target color (such as a human skin color) and the pixels of other colors by further clustering a pixel group obtained by color gamut extraction. Examples of the latter include snake, level set, and graph cut (for example, see NPL 1). In these methods, an optimum solution of a contour (the boundary between the foreground and the background) of a foreground area is solved as an energy minimization problem.
In the area partitioning method, in order to simplify the algorithm and improve partition accuracy, frequently a user instructs a representative color of each of the foreground and the background (called interactive segmentation). For example, NPL 1 discloses a method in which, when the user draws a line in a part of each of the foreground and the background of the display image, the representative colors of the foreground and the background are sampled from the line.
The interactive segmentation is very useful for such a case that it is difficult to automatically divide the foreground and the background. Examples of the case include the case that the color of the foreground or the background is unknown, the case that many colors and patterns are included in the image, and the case that the color of the foreground is similar to that of the background. However, depending on the user, possibly the user feels that work to designate both the foreground and the background is troublesome, or it takes time for the user to search the appropriate background. It is intuitive as a feeling of a general human to designate a part of the interesting object (foreground). On the other hand, a manipulation to designate the uninteresting area (background) is not intuitive, but many users feel an uncomfortable feeling.
PTL 2 proposes a method for simplifying designation work of the user. In the method, a size (a range that can be present) of the object is previously set as prior knowledge, a point (background) existing outside the object is estimated from a coordinate of the point and the size of the object to extract the colors of the foreground and the background when the user designates one point of the object (foreground). However, the method can hardly be applied to the case that the size of the object is unknown, and the method lacks versatility.
In an “automatic selection tool” and a “quick selection tool” mounted on photo-retouch software “Photoshop” (product of Adobe Systems Incorporated), when the user designates a part of the image, the similar color pixel located around the designated place is automatically selected. That is, the area can be extracted only by designating a part of the foreground, and the work to designate the background is eliminated. However, because only a similarity with the color (the representative color of the foreground) of the designated place is evaluated in the software, accuracy of an extraction result is not too high. For example, in the case that the color of the foreground is similar to that of the background, or in the case that a change in color of the foreground portion is gently continued, the range intended by the user is not selected, but correction work such as addition or deletion of range is required.